//
//  DASystemNotificationTableViewCell.m
//  DABook
//
//  Created by DreamArts on 16/4/22.
//  Copyright © 2016年 lidongyang. All rights reserved.
//

#import "DASystemNotificationTableViewCell.h"
#import "DASystemNotificationModel.h"
#import "DALabel.h"
#import "DAHeader.h"
#import "Utility.h"
@interface DASystemNotificationTableViewCell ()

@property (weak, nonatomic) IBOutlet UIView *backView;
@property (weak, nonatomic) IBOutlet UIImageView *systemImageView;
@property (weak, nonatomic) IBOutlet DALabel *contentLabel;
@property (weak, nonatomic) IBOutlet DALabel *timeLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLineLabel;

@property (weak, nonatomic) IBOutlet UIView *systemView;


@end
@implementation DASystemNotificationTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

//- (void)setSystemModel:(DASystemNotificationModel *)systemModel{
//    if (_systemModel !=  systemModel) {
//        _systemModel = systemModel;
//    }
//    self.backView.backgroundColor = [UIColor colorWithHexString:white];
//    self.backView.layer.cornerRadius = 5;
//   // self.systemImageView.backgroundColor = [UIColor colorWithHexString:yellow];
//    self.systemView.layer.cornerRadius = 15;
//    self.systemImageView.image = [UIImage imageNamed:@"speaker@3x"];
//    self.systemView.backgroundColor = [UIColor supportGreenColor];
//    [self.contentLabel setText:systemModel.systemContent fitToContent:YES];
//    self.contentLabel.textColor = [UIColor colorWithHexString:systemMessageColor];
//    [self.timeLabel setText:systemModel.sysytemTime fitToContent:YES];
//    self.timeLabel.textColor = [UIColor colorWithHexString:timeColor];
//    self.timeLineLabel.backgroundColor = [UIColor colorWithHexString:timeLineColor];
//
//}

- (void)setTimeLineModel:(DAHomePageTimeLineModel *)timeLineModel{
    if (_timeLineModel != timeLineModel) {
        _timeLineModel = timeLineModel;
    }
    self.backView.backgroundColor = [UIColor colorWithHexString:white];
    self.backView.layer.cornerRadius = 5;
    // self.systemImageView.backgroundColor = [UIColor colorWithHexString:yellow];
    self.systemView.layer.cornerRadius = 15;
    self.systemImageView.image = [UIImage imageNamed:@"speaker@3x"];
    self.systemView.backgroundColor = [UIColor supportGreenColor];
    NSString *systemMessage = timeLineModel.timelineMessage;
    [self.contentLabel setText:systemMessage fitToContent:YES];
    self.contentLabel.textColor = [UIColor colorWithHexString:systemMessageColor];
    NSString *timeLineDate = timeLineModel.timelineDate;
    [self.timeLabel setText:timeLineDate fitToContent:YES];
    self.timeLabel.textColor = [UIColor colorWithHexString:timeColor];
    self.timeLineLabel.backgroundColor = [UIColor colorWithHexString:timeLineColor];
    
    
}




@end
